Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use require wherever possible #19

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

tomodachi94
Copy link

@tomodachi94 tomodachi94 commented Dec 10, 2022

There's only two modules that needs conversion, and the rest should be simple. We'll also need to move the startup scripts to startup.d/rail*.lua and add a dependency on startupmgr.

See also: danports/prism-core#27

This is the only API that needs conversion to a module.
@tomodachi94 tomodachi94 marked this pull request as draft December 10, 2022 03:22
@tomodachi94
Copy link
Author

@danports what is config.t?

Also moved the two modules's source code files to .lua.
Also removed some blank lines that had whitespace.
@danports
Copy link
Owner

config.t is a template file used for configuration.

Also trimmed some whitespace and sent unused
iterators to nil.
@tomodachi94
Copy link
Author

This is out of scope for this PR, but maybe we should figure out a better solution for configuration settings. The default settings API is lovely to work with, but it's restricted to later versions. Maybe we should make a shim for that?

Trimmed whitespace, split functions into a separate module.
@tomodachi94
Copy link
Author

tomodachi94 commented Dec 10, 2022

I'm going to split railrouter, railstation, and railswitch into separate modules and startup files, so other things can be built on top of it. See cbccefc for an example of what I'll do.

Refactored to use `require`, as well as split
into a separate module. Some whitespace was trimmed.
Also made it use `require` and trimmed whitespace.
@tomodachi94 tomodachi94 marked this pull request as ready for review December 10, 2022 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants